package app.server.project.main.service.db.dao;

import app.server.project.core.constants.Def;
import app.server.project.main.service.db.entity.RoomEntity;
import app.server.project.main.service.db.entity.UserDeviceEntity;
import app.server.project.main.service.db.mapper.RoomMapper;
import app.server.project.main.service.db.mapper.UserDeviceMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Administrator
 * @description 针对表【user_info(用户信息表)】的数据库操作Service实现
 * @createDate 2025-01-16 15:25:22
 */
@Repository
public class UserDeviceDao extends ServiceImpl<UserDeviceMapper, UserDeviceEntity> {


    @Cacheable
    public List<UserDeviceEntity> getData(long userId) {
        return this.lambdaQuery().eq(UserDeviceEntity::getUserId,userId)
                .eq(UserDeviceEntity::getIsDel, Def.FALSE)
                .list();
    }
}




